package com.iamgod.savemoney;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import com.iamgod.savemoney.base.BaseActivity;
import com.iamgod.savemoney.bean.PlanConfigBean;
import com.iamgod.savemoney.dao.PlanConfigDao;
import com.iamgod.savemoney.sys.Config;

import android.os.Bundle;
import android.app.Activity;
import android.database.sqlite.SQLiteDatabase;
import android.view.Menu;

public class WelcomeActivity extends BaseActivity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);  
        PlanConfigDao pd = new PlanConfigDao(this,Config.DataBase.DATABASE_NAME);
        PlanConfigBean b = new PlanConfigBean();
        //b.setId(2);
        b.setPlanName("吃饭1df");
        b.setPlanPay("15.1df");
        b.setPlanTime(new Date().toString());
        b.setPlanType("plantype");
        b.setConsumeType("consumeType");
       // pd.insert(b);
        //pd.update(b);
        //pd.delete(2);
        List<PlanConfigBean> list = pd.query();
        for(PlanConfigBean bean:list){
        	System.out.println("----------------------"+bean.getPlanName());
        }
        pd.close();
        
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.activity_main, menu);
        return true;
    }
}
